/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.seminariosab.tools;

import com.mysql.jdbc.MySQLConnection;
import java.sql.DriverManager;

/**
 *
 * @author Administrador
 */
public class SABCnxTool {
    MySQLConnection cnx_m=null;
    
    public SABCnxTool(){
        String unam="",pname="",URL="";
        try {
           //Register the JDBC driver for MySQL.
            Class.forName("com.mysql.jdbc.Driver");
            
            //Define URL of database server for
            // database named mysql on the localhost
            // with the default port number 3306.
            String url ="jdbc:mysql://192.168.23.1:3306/asteriskcdrdb";

            //Get a connection to the database for a
            // user named root with a blank password.
            // This user is the default administrator
            // having full privileges to do anything.
            cnx_m =(MySQLConnection) DriverManager.getConnection(url, "root", "s3rv3r");
        } catch (Exception ex) {
            System.out.println(""+SABCnxTool.class.getName()+" - "+ ex.toString());
        }
    }
    
    public MySQLConnection getMySQLCnx(){
        return cnx_m;
    }
    
    public String[] getCredentials(){
        return null;
    }
    
}
